﻿@model IEnumerable<TruckingApplication.Dal.EntityModels.ORDER>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Order #
        </th>
        <th>
            Gross
        </th>
        <th>
            Paid?
        </th>
        <th>
            Due Date
        </th>
        <th>
            Pickup City
        </th>
        <th>
            Pickup State
        </th>
        <th>
            Drop-Off City
        </th>
        <th>
            Drop-Off State
        </th>
        <th>
            Status
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.orderNum)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.gross)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.paidStatus)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dueDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.pickupCity)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.pickupState)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dropOffCity)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dropOffState)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ORDER_STATUS.status)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.orderID }) |
            @Html.ActionLink("Details", "Details", new { id=item.orderID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.orderID })
        </td>
    </tr>
}

</table>
